<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>junglego: neuron.hpp Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">junglego
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">neuron.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="neuron_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef _NEURON_H_</span>
<a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define _NEURON_H_</span>
<a name="l00003"></a>00003 <span class="preprocessor"></span>
<a name="l00004"></a>00004 <span class="preprocessor">#include &quot;<a class="code" href="types_8hpp.html">types.hpp</a>&quot;</span>
<a name="l00005"></a>00005 <span class="preprocessor">#include &quot;<a class="code" href="gl_helper_8hpp.html">glHelper.hpp</a>&quot;</span>
<a name="l00006"></a>00006 
<a name="l00007"></a>00007 <span class="keyword">class </span><a class="code" href="class_neuron.html">Neuron</a>;
<a name="l00008"></a>00008 
<a name="l00009"></a><a class="code" href="structconnection.html">00009</a> <span class="keyword">struct </span><a class="code" href="structconnection.html">connection</a>{
<a name="l00010"></a><a class="code" href="structconnection.html#a1d859933a73cb920509d054135d9610d">00010</a>     <a class="code" href="class_neuron.html">Neuron</a> * <a class="code" href="structconnection.html#a1d859933a73cb920509d054135d9610d">pNeuron</a>;
<a name="l00011"></a><a class="code" href="structconnection.html#a1eb6b0e42f4f3721f21b15a7730403ca">00011</a>     <span class="keywordtype">float</span> <a class="code" href="structconnection.html#a1eb6b0e42f4f3721f21b15a7730403ca">weight</a>;
<a name="l00012"></a>00012 };
<a name="l00013"></a>00013 
<a name="l00014"></a><a class="code" href="class_neuron.html">00014</a> <span class="keyword">class </span><a class="code" href="class_neuron.html">Neuron</a> {
<a name="l00015"></a><a class="code" href="class_neuron.html#ac33cc5f02847c1ea2db58262bf26b016">00015</a>     <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="class_neuron.html#ac33cc5f02847c1ea2db58262bf26b016">m_nConn</a>;
<a name="l00016"></a><a class="code" href="class_neuron.html#af6c0c80c1b8e86b392d84b8371d10f23">00016</a>     <a class="code" href="structconnection.html">connection</a> * <a class="code" href="class_neuron.html#af6c0c80c1b8e86b392d84b8371d10f23">m_connections</a>;
<a name="l00017"></a><a class="code" href="class_neuron.html#ad5a9673fbe120c0f6f517f5161e5c440">00017</a>     <span class="keywordtype">float</span> <a class="code" href="class_neuron.html#ad5a9673fbe120c0f6f517f5161e5c440">m_threshold</a>;
<a name="l00018"></a><a class="code" href="class_neuron.html#ae679bea3dee256f4c6e41a18bcf58b82">00018</a>     <span class="keywordtype">float</span> <a class="code" href="class_neuron.html#ae679bea3dee256f4c6e41a18bcf58b82">m_state</a>;
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="keyword">public</span>:
<a name="l00021"></a>00021     <a class="code" href="class_neuron.html#a823487d01615fadb8ac19a2768dd9d96">Neuron</a> ();
<a name="l00022"></a>00022     <a class="code" href="class_neuron.html#a94a250ce7e167760e593979b899745b1">~Neuron</a> ();
<a name="l00023"></a>00023     <span class="keywordtype">void</span> <a class="code" href="class_neuron.html#a471ac0d115eb2c16b3a4278f9d8f88e5">init</a> (<a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> nConn, <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> threshold);
<a name="l00024"></a>00024     <span class="keywordtype">void</span> <a class="code" href="class_neuron.html#a0bcd9db8844e35e22268568286742117">setState</a> (<span class="keywordtype">float</span> state);
<a name="l00025"></a>00025     <span class="keywordtype">float</span> <a class="code" href="class_neuron.html#ab2734b21c9d748fe8c67a41c401e041a">getState</a> ();
<a name="l00026"></a>00026     <span class="keywordtype">float</span> <a class="code" href="class_neuron.html#a0bcd9db8844e35e22268568286742117">setState</a> ();
<a name="l00027"></a>00027     <span class="keywordtype">void</span> <a class="code" href="class_neuron.html#abcc93d2ce3bf6ade4a50034737d29bda">copy</a> (<a class="code" href="class_neuron.html">Neuron</a> * source);
<a name="l00028"></a>00028     <span class="keywordtype">void</span> <a class="code" href="class_neuron.html#ac231bb1f90ee544bc541c584457e4ac2">mutate</a> (<span class="keywordtype">int</span> rate);
<a name="l00029"></a>00029     <span class="keywordtype">void</span> <a class="code" href="class_neuron.html#ada09a088efc0036ee18261c09ab57c8e">compute</a>();
<a name="l00030"></a>00030     <a class="code" href="structconnection.html">connection</a> * <a class="code" href="class_neuron.html#a0cab4dd80848201e0f10fae42b1d8655">getConnections</a>();
<a name="l00031"></a><a class="code" href="class_neuron.html#a4c58bcfd05a9de0c792ccad746ecbd8b">00031</a>     <span class="keyword">inline</span> <a class="code" href="types_8hpp.html#a91ad9478d81a7aaf2593e8d9c3d06a14">uint</a> <a class="code" href="class_neuron.html#a4c58bcfd05a9de0c792ccad746ecbd8b">getNumOfConn</a>(){ <span class="keywordflow">return</span> <a class="code" href="class_neuron.html#ac33cc5f02847c1ea2db58262bf26b016">m_nConn</a>; };
<a name="l00032"></a>00032 };
<a name="l00033"></a>00033 
<a name="l00034"></a>00034 <span class="preprocessor">#endif</span>
</pre></div></div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 20 2012 21:57:14 for junglego by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
